{use master_page('front/v_inner_master')}

{block main_body}

<style>
    .listform{padding:0px;margin:0px;}
</style>
<?
$where = $this->Request();
$menu = array_remove($where, 'menu');
// $where["class.id"] = $article_class->id;
$where['page_size'] = 12;
$articles = $this->article_manager->get_list($where);
$record_count = $this->article_manager->query_result->record_count;
$page_size=$where['page_size'];
?>



    <div class="outside"><!-- 图片一页12个 -->
        <?php foreach ( $articles as $article):?>
        <dl class="pics">
            <dt>
                <a href="<?=_U("article/show?id=$article->id?menu=".$_GET['menu'])?>" target="_blank">
                    <!--img src="images/2014810231616497.jpg" alt=""/-->
                    <?php if(sizeof($article->fetch_images())==0)
                    {?>
                        <img src="images/noimage_1.jpg" boeder="0px"/>
                    <?}
                    else
                    {?>
                        <img src="<?=$article->fetch_image(0)?>" border="0px"/>
                    <?}?>
                </a>
            </dt>
            <dd>
                <a href="<?=_U("article/show?id=$article->id?menu=".$_GET['menu'])?>" target="_blank"><?=mb_substr($article->title,0,6,'UTF8')?></a>
            </dd>
        </dl>
        <?php endforeach;?>
        <!--dl class="pics"><dt><a href="p_contents.htm" target="_blank"><img src="images/2014810225947736.jpg" alt=""/></a></dt><dd><a href="p_contents.htm" target="_blank">中国电信</a></dd></dl>
        <dl class="pics"><dt><a href="p_contents.htm" target="_blank"><img src="images/2014810231113978.jpg" alt=""/></a></dt><dd><a href="p_contents.htm" target="_blank">中国联通</a></dd></dl>
        <dl class="pics"><dt><a href="p_contents.htm" target="_blank"><img src="images/2014810231347666.jpg" alt=""/></a></dt><dd><a href="p_contents.htm" target="_blank">中国移动</a></dd></dl>
        <dl class="pics"><dt><a href="p_contents.htm" target="_blank"><img src="images/2014810224833654.jpg" alt=""/></a></dt><dd><a href="p_contents.htm" target="_blank">芜湖供电局</a></dd></dl-->

    </div>
<form class="listform"  action="<?=_U("article/index")?>" method="get">
    <?$this->load->view('front/v_pager_form',array('record_count'=>$record_count,'page_size'=>$page_size))?>
</form>


{end}